package com.pzb.market.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pzb.goods.domain.GdGoods;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.pzb.common.core.domain.BaseEntity;

/**
 * 店铺活动对象 mk_discount
 * 
 * @author pzb
 * @date 2021-10-12
 */
public class MkDiscount extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long id;

    /** 商户id */
    private String extAppid;

    /** 优惠名称 */
    private String discountName;

    /** 订单可使用金额 */
    private BigDecimal availableAmount;

    private String unit;

    /** 活动类型   0为满减，1满折 2满包邮 3送赠品 */
    private String type;

    /** 减免金额或折扣率，95折用0.95表示 */
    private BigDecimal deductionAmount;

    /** 开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date beginTime;

    /** 结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    /** 活动状态，0为正常，1为停用 */
    private String status;

    /** 可使用商品  0为全部商品，1为指定商品 */
    private String availableGoods;

    private List<Long> classIds;

    private List<Long> goodsIds;

    private List<GdGoods> giftList;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setExtAppid(String extAppid) 
    {
        this.extAppid = extAppid;
    }

    public String getExtAppid() 
    {
        return extAppid;
    }
    public void setDiscountName(String discountName) 
    {
        this.discountName = discountName;
    }

    public String getDiscountName() 
    {
        return discountName;
    }
    public void setAvailableAmount(BigDecimal availableAmount) 
    {
        this.availableAmount = availableAmount;
    }

    public BigDecimal getAvailableAmount() 
    {
        return availableAmount;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public void setType(String type)
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setDeductionAmount(BigDecimal deductionAmount) 
    {
        this.deductionAmount = deductionAmount;
    }

    public BigDecimal getDeductionAmount() 
    {
        return deductionAmount;
    }
    public void setBeginTime(Date beginTime) 
    {
        this.beginTime = beginTime;
    }

    public Date getBeginTime() 
    {
        return beginTime;
    }
    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setAvailableGoods(String availableGoods) 
    {
        this.availableGoods = availableGoods;
    }

    public String getAvailableGoods() 
    {
        return availableGoods;
    }

    public List<Long> getClassIds() {
        return classIds;
    }

    public void setClassIds(List<Long> classIds) {
        this.classIds = classIds;
    }

    public List<Long> getGoodsIds() {
        return goodsIds;
    }

    public void setGoodsIds(List<Long> goodsIds) {
        this.goodsIds = goodsIds;
    }

    public List<GdGoods> getGiftList() {
        return giftList;
    }

    public void setGiftList(List<GdGoods> giftList) {
        this.giftList = giftList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("extAppid", getExtAppid())
            .append("discountName", getDiscountName())
            .append("availableAmount", getAvailableAmount())
            .append("type", getType())
            .append("deductionAmount", getDeductionAmount())
            .append("beginTime", getBeginTime())
            .append("endTime", getEndTime())
            .append("status", getStatus())
            .append("availableGoods", getAvailableGoods())
            .toString();
    }
}
